package com.ljh.seckill.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author grung
 * @Date 2021/2/22 17:33
 * @Version 1.0
 */

@Data
@Entity
@Table(name = "tbl_resouce")
public class Resource implements Serializable {

    @Id
    @Column(name = "id", columnDefinition = "bigint COMMENT '主键'")
    private String id;

    @Column(name = "stock", columnDefinition = "int COMMENT '库存'")
    private Integer stock;

    @Column(name = "amount", columnDefinition = "decimal(15,2) default '0' COMMENT '价格'")
    private BigDecimal amount;

    @Column(name = "create_date", columnDefinition = "datetime NOT NULL COMMENT '创建时间'")
    private Date createDate;

    @Column(name = "update_date", columnDefinition = "datetime NOT NULL COMMENT '更新时间'")
    private Date updateDate;

}